package cn.maihe.elg.operation.model.enums;

/**
 * @author JHWei on 2018-07-12.
 * @ 创建日期：2018-07-12
 * 0-禁用,1-启用
 */
public enum EnabledFlagEnum {

    /**
     * 禁用
     *
     */
    DISABLE("0","禁用"),

    /**
     * 启用
     *
     */
    ENABLE("1","启用");

    private String value;
    private String label;

    EnabledFlagEnum(String value, String label) {
        this.value = value;
        this.label = label;
    }

    public String getValue() {
        return value;
    }

    public String getLabel() {
        return label;
    }

    public static boolean contains(String type){
        for(EnabledFlagEnum typeEnum : EnabledFlagEnum.values()){
            if(typeEnum.value.equals(type)){
                return true;
            }
        }
        return false;
    }
}
